﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

//using Microsoft.VisualStudio.TestTools.UnitTesting;

//namespace Pibby.Core.Ioc.Tests
//{
//    [TestClass]
//    public class TypeRegistryTests
//    {
//        public abstract class AbstractRegisterClass { }

//        public class NonAbstractRegisterClass { }

//        [TestMethod]
//        [ExpectedException(typeof(ArgumentException))]
//        public void TypeRegistry_Register_AbstractType_ThrowsException()
//        {
//            var registry = new TypeRegistry();

//            registry.Register(typeof(string), typeof(AbstractRegisterClass));
//        }

//        [TestMethod]
//        public void TypeRegistry_Register_ConcreteType_Accepted()
//        {
//            var registry = new TypeRegistry();

//            registry.Register(typeof(string), typeof(NonAbstractRegisterClass));
//        }

//        [TestMethod]
//        public void TypeRegistry_Register_DuplicateType_ReplaceOriginal()
//        {
//            var registry = new TypeRegistry();

//            registry.Register(typeof(string), typeof(NonAbstractRegisterClass));
//            registry.Register(typeof(string), typeof(int));

//            Assert.AreEqual(typeof(int), registry.Find(typeof(string)));
//        }

//        [TestMethod]
//        public void TypeRegistry_Contains_EmptyRegistry_NotFound()
//        {
//            var registry = new TypeRegistry();

//            Assert.IsFalse(registry.Contains(typeof(string)));
//        }

//        [TestMethod]
//        public void TypeRegistry_Contains_RegisteredType_IsFound()
//        {
//            var registry = new TypeRegistry();

//            registry.Register(typeof(string), typeof(int));

//            Assert.IsTrue(registry.Contains(typeof(string)));
//        }

//        [TestMethod]
//        [ExpectedException(typeof(TypeNotRegisteredException))]
//        public void TypeRegistry_Find_TypeNotRegistered_ThrowsException()
//        {
//            var registry = new TypeRegistry();

//            registry.Find(typeof(string));
//        }

//        [TestMethod]
//        public void TypeRegistry_Find_TypeIsRegistered_ReturnsCorrectType()
//        {
//            var registry = new TypeRegistry();

//            registry.Register(typeof(string), typeof(bool));

//            Assert.AreEqual(typeof(bool), registry.Find(typeof(string)));
//        }

//    }
//}
